<? 
	session_start();
	require("Admin/connect.php");
	$masdb=$_REQUEST["sdbid"];
	$mal=$_REQUEST["lopid"];		
	$tiethoc=$_REQUEST["tiethoc"];
	$mamh=$_REQUEST["mamh"];
	$baihoc=$_REQUEST["baihoc"];
	$nhanxet=$_REQUEST["nhanxet"];
	$vang=$_REQUEST["vang"];
	$xeploai=$_REQUEST["xeploai"];
	$magv=$_REQUEST["magv"];
	$ngay=$_REQUEST["demol1"];
	$sqldate = strtotime($ngay);
	$date = date('Y-m-d', $sqldate);						
	$sql="update sodaubai set mal='{$mal}', ngay='{$date}', tiethoc='{$tiethoc}', mamh='{$mamh}', baihoc='{$baihoc}', nhanxet='{$nhanxet}', vang='{$vang}', xeploai='{$xeploai}', magv='{$magv}' where masdb='{$masdb}'";	
	mysql_query("$sql") or die("Error!");
	mysql_close();	
	header("Location:sodaubai.php?mal=$mal");
?>
